/**
 * Filename: d:\CODE\FTP\FTP_TEST\FTP\static\js\index.js
 * Path: d:\CODE\FTP\FTP_TEST\FTP\static\js
 * Created Date: Tuesday, May 10th 2022, 5:05:56 pm
 * Author: xiguan
 * 
 * Copyright (c) 2022 XiGuan Inc.
 */


const basic_url = "http://127.0.0.1:8880"

let current_syncdir_id = 0; // 当前同步目录编号
let current_server_port = 22; //当前监听端口
let current_interclock_id = 0; //当前同步定时器id

// 封装ajax请求

function ajax(params){
    let url = basic_url+params.url;
    let data = params.data;
    let method = "GET";
    if(params.method !== ""){
        method = params.method;
    }

    return $.ajax({
        url : url,
        data : data,
        method: method
    });
}


function btn_exit(){
    window.location.href("/user/go_login");
}


$(async function() {
    // $("#btn-exit").click(() =>{
    //     alert("ha");
    //     window.location.href("/user/go_login");
    //     alert("ha");
    // });
})